﻿import com.gamemeal.mvc.*;
import com.gamemeal.mvc.datatype.*;

/**
 * @author colin
*/

class View extends AbstractView implements IView{
	private var inputText : IView;

	public function View(){
	}

	private function bind(){
		bindingCollection.push(new Binding(inputText,Model.instance().dataField));
	}

	private function onMouseDown(){
		trigger();
	}

	private function trigger(){try{
		var c:Controller = new Controller(this);
		c.action();
//		trace(Model.instance().dataField.value);
	}catch(e){/*the value is invalidate. handle it or reset it to last state.*/}}
}